<%-- 
    Document   : jsonOpcionesPerfil
    Created on : 07/07/2011, 05:29:47 PM
    Author     : gcarlos
--%>

<%@page contentType="application/json" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>

<c:set  var="i" value="0"/>
<c:set  var="j" value="0"/>
[
    <c:forEach var="modulo" items="${listaModulo}">
        <c:if test="${i != 0 }">,</c:if>
        {
            text: "${modulo.cmodu_descripcion}",
            id: "${modulo.nmodu_identificador}",
            cls: "folder",
            children:
            [
            <c:forEach var="opcion" items="${listaOpcion}">
                <c:if test="${opcion.nmodu_identificador eq modulo.nmodu_identificador }">
                    <c:if test="${j != 0 }">,</c:if>
                    {
                        text: "${opcion.crecu_nombre}",
                        id: "${opcion.nrecu_identificador}",
                        cls: "folder",
                        leaf: true,
                        url:"${opcion.crecu_url}"
                    }
                    <c:set  var="j" value="${j + 1}"/>
                </c:if>
            </c:forEach>
            ]
        }
        <c:set  var="i" value="${i + 1}"/>
        <c:set  var="j" value="0"/>
    </c:forEach>

        
    
]
